<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="css/element-ui.css">
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/common.css" />
    <title>单位注册</title>
    <style type="text/css">
        html, body, #app {
            padding: 0px;
            margin: 0px;
            
        }
        #app{
        	border-top: 3px solid #0D9AFF;
           	background: #FFFFFF;
            box-shadow: 0px 2px 4px 0 rgba(200,200,200,0.50);
            padding: 25px;
            background: url(./images/bg.png) no-repeat;
			background-size: cover;
			/*background-attachment: fixed;*/
        }
		/*.table_list{
			margin:0 10px;
			width:100%;
			height:100%;
			overflow: hidden;
		}*/
		.pagination{
			text-align: center;
			margin-top: 30px;
		}
		.el-dialog__footer {
			padding: 10px 20px 20px;
			text-align: center;
			-webkit-box-sizing: border-box;
			box-sizing: border-box;
		}
		.el-dialog__body {
			color: rgb(96, 98, 102);
			font-size: 14px;
			word-break: break-all;
			padding: 0px 20px;
		}
		.el-input__inner {
		    -webkit-appearance: none;
		    background-color: #FFF;
		    background-image: none;
		    border-radius: 4px;
		    border: 1px solid #DCDFE6;
		    -webkit-box-sizing: border-box;
		    box-sizing: border-box;
		    color: #606266;
		    display: inline-block;
		    font-size: inherit;
		    height: 30px;
		    line-height: 30px;
		    outline: 0;
		    padding: 0 15px;
		    -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
		    transition: border-color .2s cubic-bezier(.645,.045,.355,1);
		    width: 100%;
		}	
    </style>
</head>

<body>
<div v-cloak id="app">
	<div style="margin-top: 10px; border-bottom:1px solid rgba(200,200,200,0.43);;">
		<el-form :model="selectForm" :rules="rules" ref="selectForm" label-width="150px">
		  	<el-row>
				<el-col :span="6">
					<el-form-item label="统一社会信用代码:" prop="socialCode">
					   	<el-input v-model="selectForm.socialCode" style="width: 180px;" placeholder="" ></el-input>
					</el-form-item>
				</el-col>
				<el-col span="7">
				   	<el-form-item label="企业名称:" prop="enterpriseName" label-width="100px">
						<el-input v-model="selectForm.enterpriseName" style="width: 376px;" placeholder=""></el-input>
				  	</el-form-item>
				</el-col>
			 	<el-col span="10">
				 <el-form-item label="注册时间:">
					 <el-col :span="8">
						 <el-form-item prop="beforeDate">
							 <el-date-picker type="date" placeholder="选择日期" v-model="selectForm.beforeDate" style="width: 180px;">
							 </el-date-picker>
						 </el-form-item>
					</el-col>
					<el-col :span="1" style="text-align: center;">—</el-col>
					<el-col :span="8">
						<el-form-item prop="afterDate">
							<el-date-picker type="date" placeholder="选择日期" v-model="selectForm.afterDate" style="width: 180px;">
							</el-date-picker>
						</el-form-item>
					</el-col>
				</el-form-item>
				</el-col>
	 		</el-row>

		  	<el-row>
			  	<el-col :span="6">
				  	<el-form-item label="处理状态:" style="width: 330px;letter-spacing: 11px;" prop="processState">				    	
				    	<el-select  v-model="selectForm.processState" placeholder="请选择" style="width: 180px;">
							<el-option label="已审核" value="1"></el-option>
							<el-option label="待审核" value="2"></el-option>
							<el-option label="已退回" value="3"></el-option>
						</el-select>
				  	</el-form-item>
			  	</el-col>
			  	<el-col :span="7">
				  	<el-form-item label="单位类型:" style="width: 330px;" prop="unitType" label-width="100px">
						<el-select  v-model="selectForm.unitType" placeholder="请选择" style="width: 180px;">
							<el-option label="评价单位" value="1"></el-option>
							<el-option label="建筑单位" value="2"></el-option>
						</el-select>
				  	</el-form-item>
			  	</el-col>
			  	<div style="float: right;">
			  		<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm('selectForm')">查询</el-button>
			  		<el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm('selectForm')">重置</el-button>
			  	</div>
			  	
		  	</el-row>
		</el-form>
 	</div>

	  <el-table :data="tableData.slice((currentPage-1)*pagesize,currentPage*pagesize)" border style="width: 100%;margin-top: 35px;" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
		<el-table-column type="selection" ></el-table-column>
		<el-table-column
			:resizable="false"
			type="index"
		    label="序号"
		    width="80" align="center" >
		</el-table-column>
	     <el-table-column				    
	       prop="ROWGUID"
	       label="统一社会信用代码"
	       width="200"
		   align="center">
	     </el-table-column>
	     <el-table-column
	       prop="PLAN_NAME"
	       label="企业名称"
		   width="300"
	       align="center">
	     </el-table-column>
	     <el-table-column
	       prop="PLAN_TYPE"
	       label="企业经营许可范围"
		   width="200"
	       align="center">
	     </el-table-column>
	     <el-table-column
	       prop="SUPERVISE_DEPT"
	       label="注册时间"
		   width="140"
	       align="center">
	     </el-table-column>
	     <el-table-column
	       prop="YEAR"
	       label="企业性质"
		   width="200"
	        align="center">
	     </el-table-column>
	     <el-table-column
	       prop="STATUS"
	       label="企业法人"
		  width="120"
	       align="center">
	     </el-table-column>
		 <el-table-column
		   prop="status"
		   label="处理状态"
		   width="100"
		   align="center">
		   	<template scope="scope">
	            <span v-if="scope.row.status==0" style="color:#20A0FF;">已审核</span>
	            <span v-if="scope.row.status==1" style="color:#F19437;">待审核</span>
	            <span v-if="scope.row.status==2" style="color:#FF4949;">已退回</span>
        	</template>
		 </el-table-column>
	     <el-table-column				   
	       label="操作"
		   width=""
	       align="center">
	       <template slot-scope="scope">
	         <el-button type="primary" size="mini" @click="view(scope.$index,scope.row);dialogVisible1 = true">查看详细信息</el-button>
	       </template>
	     </el-table-column>
	   </el-table>
	   <div style="overflow: hidden;">
			<div class="pagination">
				<el-pagination
					 @size-change="handleSizeChange"
					 @current-change="handleCurrentChange"
					 :current-page="currentPage"
					 :page-sizes="[5, 10, 20, 40]"
					 :page-size="pagesize"
					   background
					 layout="total, sizes,prev, pager, next"
					 :total="tableData.length"
					 prev-text="上一页"
					 next-text="下一页">
				</el-pagination>
			</div>
			<div style="float:right;">
				<el-button type="primary" size="small" style="width: 90px;height: 30px;" @click="">批量审核</el-button>
				<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="">审核</el-button>
				<el-button type="info" size="small" style="width: 100px;height: 30px;" @click="">查看详细信息</el-button>
			</div>
		</div>
	
</div>
<script src="js/vue.js"></script>
<script src="js/element-ui.min.js"></script>
<script src="js/axios.min.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data() {
            return {
            	currentPage: 1, //默认显示页面为1
				pagesize: 5, // 每页的数据条数
                registerForm: {
                    userName: "",
                    mobile: "",
                    email: "",
                    password: "",
                    password2: "",
                },
                selectForm : {
                  	socialCode:'',
                  	enterpriseName:'',
                  	beforeDate:'',
                  	afterDate:'',
                  	processState:'',
                  	unitType:''
			 	},
			 	tableData: [
					  {
					    "ROWGUID": "111",
					    "PLAN_NAME": "计划1",
					    "YEAR":"2019",
					    "PLAN_TYPE":"年度计划",
					    "AREA": "放管局",
					    "REGIONCODE": "100000",
					    "SUPERVISE_DEPT":"放管局",
					    "SAMPLE_INSPECTION_RATIO": "1:100",
					    "REMARKS":"111111",
					    "STATUS" : "已发布",
					    "status" : "0"
					  },
					  {
					    "ROWGUID": "112",
					    "PLAN_NAME": "计划2",
					    "YEAR":"2019",
					    "PLAN_TYPE":"年度计划",
					    "AREA": "放管局",
					    "REGIONCODE": "100000",
					    "SUPERVISE_DEPT":"放管局",
					    "SAMPLE_INSPECTION_RATIO": "1:100",
					    "REMARKS":"111111",
					    "STATUS" : "已发布",
					    "status" : "1"
					  },
					  {
					    "ROWGUID": "113",
					    "PLAN_NAME": "计划3",
					    "YEAR":"2019",
					    "PLAN_TYPE":"年度计划",
					    "AREA": "放管局",
					    "REGIONCODE": "100000",
					    "SUPERVISE_DEPT":"放管局",
					    "SAMPLE_INSPECTION_RATIO": "1:100",
					    "REMARKS":"111111",
					    "STATUS" : "已发布",
					    "status" : "2"
					  },
					  {
					    "ROWGUID": "111",
					    "PLAN_NAME": "计划1",
					    "YEAR":"2019",
					    "PLAN_TYPE":"年度计划",
					    "AREA": "放管局",
					    "REGIONCODE": "100000",
					    "SUPERVISE_DEPT":"放管局",
					    "SAMPLE_INSPECTION_RATIO": "1:100",
					    "REMARKS":"111111",
					    "STATUS" : "已发布",
					    "status" : "0"
					  },
					  {
					    "ROWGUID": "111",
					    "PLAN_NAME": "计划1",
					    "YEAR":"2019",
					    "PLAN_TYPE":"年度计划",
					    "AREA": "放管局",
					    "REGIONCODE": "100000",
					    "SUPERVISE_DEPT":"放管局",
					    "SAMPLE_INSPECTION_RATIO": "1:100",
					    "REMARKS":"111111",
					    "STATUS" : "已发布",
					    "status" : "0"
					  },
					  {
					    "ROWGUID": "111",
					    "PLAN_NAME": "计划1",
					    "YEAR":"2019",
					    "PLAN_TYPE":"年度计划",
					    "AREA": "放管局",
					    "REGIONCODE": "100000",
					    "SUPERVISE_DEPT":"放管局",
					    "SAMPLE_INSPECTION_RATIO": "1:100",
					    "REMARKS":"111111",
					    "STATUS" : "已发布",
					    "status" : "0"
					  },
					  {
					    "ROWGUID": "111",
					    "PLAN_NAME": "计划1",
					    "YEAR":"2019",
					    "PLAN_TYPE":"年度计划",
					    "AREA": "放管局",
					    "REGIONCODE": "100000",
					    "SUPERVISE_DEPT":"放管局",
					    "SAMPLE_INSPECTION_RATIO": "1:100",
					    "REMARKS":"111111",
					    "STATUS" : "已发布",
					    "status" : "0"
					  }
				]
            }
            
        },
        methods: {           
            searchForm(selectForm) {              
                axios({
                    method: 'post',
                    url: '/user/register',
                    data: {
                        socialCode: this.selectForm.socialCode,
                        enterpriseName: this.selectForm.enterpriseName,
                        beforeDate: this.selectForm.beforeDate,
                        afterDate: this.selectForm.afterDate,
                        processState: this.selectForm.processState,
                        unitType: this.selectForm.unitType
                    }
                })
                .then(response => {
                    let data = response.data;
                    if (data.code == 200) {
                        
                    } else {
                        this.$message.error(data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });                  
            },
            resetForm(formName) {
            	console.log('sdsds')
		       	this.$refs[formName].resetFields();
		       	console.log('sdsds')
		    },
			/* getData() {

				// debugger
				 /!*axios.get('../common/data/datalist.json')*!/
				 axios('url',{
				     url:'/common/data/datalist.json',
					 method:'',
					 data:{
				         /!*参数*!/
					 }
				 })
				/!* .then({
					  console.log(response.data);
					    //this.datalist = response.data;
				 })*!/
			 },*/
			 //每页下拉显示数据
			handleSizeChange: function(size) {
				this.pagesize = size;
				/*console.log(this.pagesize) */
			},
			//点击第几页
			handleCurrentChange: function(currentPage) {
				this.currentPage = currentPage;
				/*console.log(this.currentPage) */
			}
        }

    })
</script>
</body>
</html>